<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body bgcolor="#b0e0e6">
<div id="app">
    <span><router-link to="/login">登录</router-link></span>
    <span><router-link to="/regist">注册</router-link></span>
    <hr/>
    <router-view></router-view>
</div>

<script src="../node_modules/vue/dist/vue.js"></script>
<script src="../node_modules/vue-router/dist/vue-router.js"></script>
<script src="login.js"></script>
<script src="regist.js"></script>

<script>
    const routes = [
        { path: '/login', component: login },
        { path: '/regist', component: regist }
    ]

    const router = new VueRouter({
        routes
    })

    //创建vue实例    new Vue({})
    var vm = new Vue({
        el: '#app',
        data: {
        },
        router
    })

</script>
</body>
</html>